<%-- 
    Document   : loginprocess
    Created on : Jan 13, 2011, 9:49:10 AM
    Author     : 253961
--%>

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%!
%>
<jsp:useBean id="loginHandler" class="test.LoginFormBean" scope="request">
    <jsp:setProperty name="loginHandler" property="*"/>
</jsp:useBean>
<%






            if (loginHandler.validate() && loginHandler.match()) {
%>
<%
            session.setAttribute("custid", loginHandler.custid);
            session.setAttribute("pwd", loginHandler.password);
            session.setAttribute("fna", loginHandler.firstname);
            session.setAttribute("default",loginHandler.defaultacc);

%>

<jsp:forward page="home.jsp"/>


<%
        } else {
%>
<jsp:forward page="index.jsp"/>
<%        }
%>